/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author lzw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';
import { downloadByUrl } from '/@/utils/file/download';

const { adminPath } = useGlobSetting();
const { ctxAdminPath } = useGlobSetting();

export interface FtdsSzscb extends BasicModel<FtdsSzscb> {
  tem?: string; // 上传模板
  excel?: string; // 生成excel
  number?: number; // 生成数量
  address?: string; // 生成文件地址
}

export const ftdsSzscbList = (params?: FtdsSzscb | any) =>
  defHttp.get<FtdsSzscb>({ url: adminPath + '/operating/ftdsSzscb/list', params });

export const ftdsSzscbListData = (params?: FtdsSzscb | any) =>
  defHttp.post<Page<FtdsSzscb>>({ url: adminPath + '/operating/ftdsSzscb/listData', params });

export const ftdsSzscbForm = (params?: FtdsSzscb | any) =>
  defHttp.get<FtdsSzscb>({ url: adminPath + '/operating/ftdsSzscb/form', params });

export const ftdsSzscbSave = (params?: any, data?: FtdsSzscb | any) =>
  defHttp.postJson<FtdsSzscb>({ url: adminPath + '/operating/ftdsSzscb/save', params, data });

export const ftdsSzscbDelete = (params?: FtdsSzscb | any) =>
  defHttp.get<FtdsSzscb>({ url: adminPath + '/operating/ftdsSzscb/delete', params });
export const ftdsZwrclEnable = (params?: FtdsSzscb | any) =>
  downloadByUrl({ url: ctxAdminPath + '/operating/ftdsSzscb/enable', params });